package com.example.dhhyc.demos.strategy.strategy2;

import java.math.BigDecimal;

/**
 * Describe :
 * question :
 *
 * @auther BaiShanshan
 * @date 2024/5/2 8:36
 */

public class Strategy2Test {
    public static void main(String[] args)
    {
        // 模拟数据
        String type = "2";
        // 获取策略
        CalHandler calHandler = HandlerCalFactory.getInvokeHandler(type);

        // 策略计算
        BigDecimal result = calHandler.calShareAmount();
        System.out.println(result);
    }
}
